package com.example.summertraining.controller;

import com.example.summertraining.dto.*;
import com.example.summertraining.entity.Result;
import com.example.summertraining.service.AnjukeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
@CrossOrigin
@RequestMapping("/anjuke")
public class AnjukeController {
    @Autowired
    private AnjukeService anjukeService;

    //房子布局
    @GetMapping("/HouseBJ")
    public Result<List<houseBJ>> HouseBJ(){
        List<houseBJ> a = anjukeService.HouseBJ();
        System.out.println(a);
        return Result.success(a);
    }


    @GetMapping("/HouseCX")
    public Result<List<houseCX>> HouseCX(){
        List<houseCX> b = anjukeService.HouseCX();
        return Result.success(b);
    }

    @GetMapping("/HouseJZ")
    public Result<List<houseJZ>> HouseJZ(){
        List<houseJZ> c = anjukeService.HouseJZ();
        System.out.println(c);
        return Result.success(c);
    }

    @GetMapping("/HouseLC")
    public Result<List<houseLC>> HouseLC(){
        List<houseLC> d = anjukeService.HouseLC();
        return Result.success(d);
    }

    @GetMapping("/Address")
    public Result<List<address>> Address(){
        List<address> E = anjukeService.Address();
        return Result.success(E);
    }

    @GetMapping("/NameTD")
    public Result<List<nameTD>> NameTD(){
        List<nameTD> F = anjukeService.NameTD();
        return Result.success(F);
    }

    @GetMapping("/Introduction")
    public Result<List<introduction>> Introduction(){
        List<introduction> G = anjukeService.Introduction();
        return Result.success(G);
    }

    @GetMapping("/Mprice")
    public Result<List<mprice>> Mprice(){
        List<mprice> H = anjukeService.Mprice();
        return Result.success(H);
    }

    @GetMapping("/Price")
    public Result<List<price>> Price(){
        List<price> I = anjukeService.Price();
        return Result.success(I);
    }
}

